package com.leather.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.leather.admin.entity.Admin;
import com.leather.admin.entity.Permission;
import com.leather.admin.vo.AdminRoleVo;
import com.leather.admin.vo.AdminVo;
import com.leather.common.result.Result;

import java.util.List;

public interface AdminService extends IService<Admin> {

    /**
     * 根据id获取用户
     * @param username
     * @return
     */
    Admin getAdminById(String username);

    /**
     * 增加管理员
     * @param adminVo
     * @return
     */
    Result addAdmin(AdminVo adminVo);


    /**
     * 更改密码
     * @param adminVo
     * @return
     */
    Result changePwd(AdminVo adminVo);


    /**
     * 更改
     * @param adminId
     * @param roleId
     * @return
     */
    Result changeAdminRole(int adminId,int roleId);


    /**
     * 冻结管理员用户
     * @param adminId
     * @return
     */
    Result frozenAdmin(int adminId);

    /**
     * 解冻用户
     * @param adminId
     * @return
     */
    Result unFrozenAdmin(int adminId);


    List<String> getAdminPermission(String adminName);

    List<Permission> getAllPermission(String adminName);

    List<AdminRoleVo> getAdmin();
}
